<template>
	<view class="">
		<view class="banmi_flex   a-c b_y bg-white hede-Bottom-line">
			<view class="banmi_flex">
				<button @click="on_nav(index)" class="p-l-r-20 nav_but" v-for="(vo,index) in nav_list" :key="index">
					<text :class="nav_index==index ? 'banmi_top_menu_selected' : 'banmi_top_menu'">{{vo.name}}</text>
				</button>
			</view>
		</view>
		<view class="bg-white p-10 hede-Bottom-line">
			<template v-if="0===nav_index">
				<WxSet></WxSet>
			</template>
			<template v-if="1===nav_index">
				<wxnav></wxnav>
			</template>
			<template v-if="2===nav_index">
				<keylist></keylist>
			</template>
		</view>
	</view>

</template>

<script>
	import wxnav from './wx_nav.vue';
	import keylist from './key_list.vue';
	import WxSet from './wx_set.vue';
	export default {
		components: {
			WxSet,
			wxnav,
			keylist,
		},
		data() {
			return {
				nav_list: [{
						"id": 0,
						"name": "基本设置",
						"isshow": true
					},
					{
						"id": 0,
						"name": "导航设置",
						"isshow": false
					},
					{
						"id": 0,
						"name": "自动回复",
						"isshow": false
					},
				],
				nav_index: 0,
			}
		},
		methods: {
			on_nav(index) {
				if (index == 0) {
					this.nav_index = index;
					return
				}
				// if (this.vname && this.apppid && this.AppSecret) {
				// } else {
				// 	uni.showModal({
				// 		title: '提示',
				// 		content: '请填写公众号基本信息才可使用其功能',
				// 		success: function(res) {
				// 			if (res.confirm) {
				// 				console.log('用户点击确定');
				// 			}
				// 		}
				// 	});
				// 	return
				// }
				this.nav_index = index;
			}



		}
	}
</script>

<style>
	button::after {
		border: none;
	}


	.nav_but {
		background-color: transparent;
		border-style: none;
		border-color: transparent;
	}
</style>